#数组元素求累积和
import numpy as np
A = [[0,1,5],[3,7,5],[9,12,10]]
print(np.cumsum(A))
#行的累积和
print(np.cumsum(A, axis = 0))
#列的累积和
print(np.cumsum(A, axis = 1))